import requests

data={
"text":"你好啊亲爱的朋友们。我草泥马，我草泥马我草泥马我草泥马我草泥马我草泥马我草泥马我草泥马我草泥马我草泥马",
"role":"中文女"
}

response=requests.post(f'http://127.0.0.1:9233/tts',data=data,timeout=3600)

if response.status_code!=200:
# 出错了
    print(response.json())
else:
# 返回的wav数据流，可直接保存
    print('成功了，正在输出wav')
    with open("./tts1.wav",'wb') as f:
        f.write(response.content)